<template>
  <div class="openOrder">
    <div v-if="show1 != 1">
      <div class="header">
        <!-- 上方内容 -->
        <div class="leftData">
          <div class="upper">
            <h1>年度承接总量/吨</h1>
            <div class="boxTest">
              <span class="boxA">{{ this.listData[2].count }}</span>
            </div>
          </div>
          <div class="upper">
            <h1>总金额/万元</h1>
            <div class="boxTest">
              <span class="boxA">{{ AllMoney }}</span>
            </div>
          </div>
          <div class="upper">
            <h1>总需求/万吨</h1>
            <div class="boxTest">
              <span class="boxA">{{ AllRequest }}</span>
            </div>
          </div>
        </div>
        <!-- 中间内容 -->
        <div class="contnet">
          <!-- 中间图表 -->
          <div class="LineChart">
            <div class="hderTop">
              <el-form ref="formData" :model="formData" label-width="auto" :inline="true" size="mini">
                <el-row>
                  <el-col span="4.5">
                    <el-form-item prop="start" label="时间:">
                      <el-date-picker
                        v-model="formData.start"
                        unlink-panels
                        type="monthrange"
                        value-format="yyyy-MM"
                        range-separator="至"
                        start-placeholder="开始月份"
                        end-placeholder="结束月份"
                      ></el-date-picker>
                    </el-form-item>
                  </el-col>
                  <el-col span="4.5">
                    <el-form-item label-width="3em">
                      <el-button type="danger" @click="queryData">查询</el-button>
                    </el-form-item>
                  </el-col>
                </el-row>
              </el-form>
              <div class="btn">
                <el-button @click="railwayCargo1A">需求</el-button>
                <el-button @click="queryMoney">金额</el-button>
              </div>
            </div>
            <div class="Chart">
              <div class="LineChartLeft" id="LineChartLeftB"></div>
            </div>
          </div>
        </div>
        <!-- 待办事项 -->
        <div class="h-ul">
          <div class="h-uiLeft">
            <ul>
              <li>
                <div class="line"></div>
                <div class="title">待办事项</div>
              </li>
              <li class="hUib" v-for="(item, index) in itemList" :key="item.index">
                <span class="spanA">{{ item[0] }}</span>
                <span class="spanB">{{ item[1] }}{{ item[2] }}</span>
                <span :class="[item[1] > 0 ? 'colorRed' : 'colorHei']" @click="daibanClick(index)">查看</span>
              </li>
            </ul>
          </div>
          <div class="h-uiRight">
            <div class="upper">
              <h1>当天承接总量/吨</h1>
              <div class="boxTest">
                <span class="boxA">{{ this.listData[0].count }}</span>
              </div>
            </div>
            <div class="upper upperA">
              <h1>当月承接总量/吨</h1>
              <div class="boxTest">
                <span class="boxA">{{ this.listData[1].count }}</span>
              </div>
            </div>
          </div>
        </div>
        <!-- 下面表格 -->
        <!-- 集团 -->
        <div v-if="show1 == 2">
          <div class="tableFooter">
            <div class="leftType" ref="leftType">
              <div class="line"></div>
              <h1>需求信息</h1>
              <div class="btn-area">
                <el-form ref="formDataLeft" :model="formDataLeft" label-width="auto" :inline="true" size="mini">
                  <el-row>
                    <el-col span="4.5">
                      <el-form-item prop="start" label>
                        <el-date-picker v-model="formDataLeft.start" placeholder="选择开始时间" value-format="yyyy-MM-dd"></el-date-picker>
                      </el-form-item>
                    </el-col>
                    <el-col span="4.5">
                      <el-form-item prop="end" label-width="3em" label="——">
                        <el-date-picker v-model="formDataLeft.end" placeholder="选择结束时间" value-format="yyyy-MM-dd"></el-date-picker>
                      </el-form-item>
                    </el-col>
                    <el-col span="4.5" class="elButton">
                      <el-form-item label-width="3em">
                        <el-button type="primary" @click="Reset">重置</el-button>
                      </el-form-item>
                      <el-form-item label-width="3em">
                        <el-button type="danger" @click="search">搜索</el-button>
                      </el-form-item>
                    </el-col>
                  </el-row>
                </el-form>
              </div>
              <div>
                <el-table
                  :data="DetailedData"
                  border
                  class="demand"
                  default-expand-all
                  :height="240"
                  :header-cell-style="{ textAlign: 'center' }"
                  highlight-current-row
                >
                  <el-table-column size="mini" :index="indexMethod" type="index" show-overflow-tooltip label="序号" width="50"></el-table-column>
                  <el-table-column size="mini" prop="bidStatus" show-overflow-tooltip label="提交状态"></el-table-column>
                  <el-table-column size="mini" prop="demandCode" show-overflow-tooltip width="130" label="需求编号"></el-table-column>
                  <el-table-column size="mini" prop="brand" show-overflow-tooltip label="品牌"></el-table-column>
                  <el-table-column size="mini" prop="kind" show-overflow-tooltip label="品种"></el-table-column>
                  <el-table-column size="mini" prop="transportQuantity" show-overflow-tooltip label="运输重量"></el-table-column>
                  <el-table-column size="mini" prop="dailyOutput" show-overflow-tooltip label="规格"></el-table-column>
                  <el-table-column size="mini" prop="transportType" show-overflow-tooltip label="运输类型"></el-table-column>
                  <el-table-column size="mini" prop="transportMode" show-overflow-tooltip label="运输方式"></el-table-column>
                  <el-table-column size="mini" prop="requiredStartTime" show-overflow-tooltip label="要求开始时间" align="left" width="120"></el-table-column>
                </el-table>
              </div>
              <!-- 分页 -->
              <el-pagination
                class="pagination"
                small
                background
                ref="pagination"
                @size-change="handleSizeChange"
                @current-change="handleCurrentChange"
                :current-page="Pagination.currentPage"
                :page-sizes="Pagination.pageSizeList"
                :page-size="Pagination.pageSize"
                :layout="Pagination.layout"
                :total="Pagination.total"
              ></el-pagination>
            </div>
            <div class="leftType" ref="leftType">
              <div class="line"></div>
              <h1>费用明细信息</h1>
              <div class="btn-area">
                <el-form ref="formDataRight" :model="formDataRight" label-width="auto" :inline="true" size="mini">
                  <el-row>
                    <el-col span="4.5">
                      <el-form-item prop="start" label>
                        <el-date-picker v-model="formDataRight.start" placeholder="选择开始时间" value-format="yyyy-MM-dd"></el-date-picker>
                      </el-form-item>
                    </el-col>
                    <el-col span="4.5">
                      <el-form-item prop="end" label-width="3em" label="——">
                        <el-date-picker v-model="formDataRight.end" placeholder="选择结束时间" value-format="yyyy-MM-dd"></el-date-picker>
                      </el-form-item>
                    </el-col>
                    <el-col span="4.5" class="elButton">
                      <el-form-item label-width="3em">
                        <el-button type="primary" @click="ResetA">重置</el-button>
                      </el-form-item>
                      <el-form-item label-width="3em">
                        <el-button type="danger" @click="typeList">搜索</el-button>
                      </el-form-item>
                    </el-col>
                  </el-row>
                </el-form>
              </div>
              <el-table
                :data="rightData"
                class="charge"
                border
                default-expand-all
                :height="240"
                :header-cell-style="{ textAlign: 'center' }"
                highlight-current-row
              >
                <el-table-column size="mini" type="index" :index="indexStartNum" show-overflow-tooltip label="序号" width="50"></el-table-column>
                <el-table-column size="mini" prop="cbBillStatus" show-overflow-tooltip label="结算状态"></el-table-column>
                <el-table-column size="mini" prop="cbJpayer" show-overflow-tooltip label="结算对象"></el-table-column>
                <el-table-column size="mini" prop="cbBillType" show-overflow-tooltip label="费目名称"></el-table-column>
                <el-table-column size="mini" prop="cbWeight" align="center" show-overflow-tooltip label="结算吨位"></el-table-column>
                <el-table-column size="mini" prop="cbPrice" align="center" show-overflow-tooltip label="结算单价"></el-table-column>
                <el-table-column size="mini" prop="cbCreateTime" align="center" show-overflow-tooltip label="结算时间"></el-table-column>
              </el-table>
              <el-pagination
                class="pagination"
                small
                background
                @size-change="handleSizeChangeA"
                @current-change="handleCurrentChangeA"
                :current-page="currentPage"
                :page-size="pageSize"
                layout="sizes, prev, pager, next, jumper,total"
                :total="parinTotal"
              ></el-pagination>
            </div>
          </div>
        </div>
        <!-- 货主 -->
        <div v-if="show1 == 3">
          <div class="tableFooter">
            <div class="leftType" ref="leftType">
              <div class="line"></div>
              <h1>需求信息</h1>
              <div class="btn-area">
                <el-form ref="formDataLeft" :model="formDataLeft" label-width="auto" :inline="true" size="mini">
                  <el-row>
                    <el-col span="4.5">
                      <el-form-item prop="start" label>
                        <el-date-picker v-model="formDataLeft.start" placeholder="选择开始时间" value-format="yyyy-MM-dd"></el-date-picker>
                      </el-form-item>
                    </el-col>
                    <el-col span="4.5">
                      <el-form-item prop="end" label-width="3em" label="——">
                        <el-date-picker v-model="formDataLeft.end" placeholder="选择结束时间" value-format="yyyy-MM-dd"></el-date-picker>
                      </el-form-item>
                    </el-col>
                    <el-col span="4.5" class="elButton">
                      <el-form-item label-width="3em">
                        <el-button type="primary" @click="Reset">重置</el-button>
                      </el-form-item>
                      <el-form-item label-width="3em">
                        <el-button type="danger" @click="search">搜索</el-button>
                      </el-form-item>
                    </el-col>
                  </el-row>
                </el-form>
              </div>
              <div>
                <el-table
                  class="demand"
                  :data="DetailedData"
                  border
                  default-expand-all
                  :height="240"
                  :header-cell-style="{ textAlign: 'center' }"
                  highlight-current-row
                >
                  <el-table-column size="mini" :index="indexMethod" type="index" show-overflow-tooltip label="序号" width="50"></el-table-column>
                  <el-table-column size="mini" prop="bidStatus" show-overflow-tooltip label="提交状态"></el-table-column>
                  <el-table-column size="mini" prop="demandCode" show-overflow-tooltip width="130" label="需求编号"></el-table-column>
                  <el-table-column size="mini" prop="brand" show-overflow-tooltip label="品牌"></el-table-column>
                  <el-table-column size="mini" prop="kind" show-overflow-tooltip label="品种"></el-table-column>
                  <el-table-column size="mini" prop="transportQuantity" show-overflow-tooltip label="运输重量"></el-table-column>
                  <el-table-column size="mini" prop="dailyOutput" show-overflow-tooltip label="规格"></el-table-column>
                  <el-table-column size="mini" prop="transportType" show-overflow-tooltip label="运输类型"></el-table-column>
                  <el-table-column size="mini" prop="transportMode" show-overflow-tooltip label="运输方式"></el-table-column>
                  <el-table-column size="mini" prop="requiredStartTime" show-overflow-tooltip align="left" label="要求开始时间" width="120"></el-table-column>
                </el-table>
              </div>
              <!-- 分页 -->
              <el-pagination
                class="pagination"
                small
                background
                ref="pagination"
                @size-change="handleSizeChange"
                @current-change="handleCurrentChange"
                :current-page="Pagination.currentPage"
                :page-sizes="Pagination.pageSizeList"
                :page-size="Pagination.pageSize"
                :layout="Pagination.layout"
                :total="Pagination.total"
              ></el-pagination>
            </div>
            <div class="leftType" ref="leftType">
              <div class="line"></div>
              <h1>费用明细信息</h1>
              <div class="btn-area">
                <el-form ref="formDataRight" :model="formDataRight" label-width="auto" :inline="true" size="mini">
                  <el-row>
                    <el-col span="4.5">
                      <el-form-item prop="start" label>
                        <el-date-picker v-model="formDataRight.start" placeholder="选择开始时间" value-format="yyyy-MM-dd"></el-date-picker>
                      </el-form-item>
                    </el-col>
                    <el-col span="4.5">
                      <el-form-item prop="end" label-width="3em" label="——">
                        <el-date-picker v-model="formDataRight.end" placeholder="选择结束时间" value-format="yyyy-MM-dd"></el-date-picker>
                      </el-form-item>
                    </el-col>
                    <el-col span="4.5" class="elButton">
                      <el-form-item label-width="3em">
                        <el-button type="primary" @click="ResetA">重置</el-button>
                      </el-form-item>
                      <el-form-item label-width="3em">
                        <el-button type="danger" @click="typeList">搜索</el-button>
                      </el-form-item>
                    </el-col>
                  </el-row>
                </el-form>
              </div>
              <el-table
                :data="rightData"
                class="charge"
                border
                default-expand-all
                :height="240"
                :header-cell-style="{ textAlign: 'center' }"
                highlight-current-row
              >
                <el-table-column size="mini" type="index" :index="indexStartNum" show-overflow-tooltip label="序号" width="50"></el-table-column>
                <el-table-column size="mini" prop="cbBillStatus" show-overflow-tooltip label="结算状态"></el-table-column>
                <el-table-column size="mini" prop="cbJpayer" show-overflow-tooltip label="结算对象"></el-table-column>
                <el-table-column size="mini" prop="cbBillType" show-overflow-tooltip label="费目名称"></el-table-column>
                <el-table-column size="mini" prop="cbWeight" align="center" show-overflow-tooltip label="结算吨位"></el-table-column>
                <el-table-column size="mini" prop="cbPrice" align="center" show-overflow-tooltip label="结算单价"></el-table-column>
                <el-table-column size="mini" prop="cbCreateTime" align="center" show-overflow-tooltip label="结算时间"></el-table-column>
              </el-table>
              <el-pagination
                class="pagination"
                small
                background
                @size-change="handleSizeChangeA"
                @current-change="handleCurrentChangeA"
                :current-page="currentPage"
                :page-size="pageSize"
                layout="sizes, prev, pager, next, jumper,total"
                :total="parinTotal"
              ></el-pagination>
            </div>
          </div>
        </div>
        <!-- 供应商 -->
        <div v-if="show1 == 4">
          <div class="tableFooter">
            <div class="leftType" ref="leftType">
              <div class="line"></div>
              <h1>运单信息</h1>
              <div class="btn-area">
                <el-form ref="formDataLeft" :model="formDataLeft" label-width="auto" :inline="true" size="mini">
                  <el-row>
                    <el-col span="4.5">
                      <el-form-item prop="start" label>
                        <el-date-picker v-model="formDataLeft.start" placeholder="选择开始时间" value-format="yyyy-MM-dd"></el-date-picker>
                      </el-form-item>
                    </el-col>
                    <el-col span="4.5">
                      <el-form-item prop="end" label-width="3em" label="——">
                        <el-date-picker v-model="formDataLeft.end" placeholder="选择结束时间" value-format="yyyy-MM-dd"></el-date-picker>
                      </el-form-item>
                    </el-col>
                    <el-col span="4.5" class="elButton">
                      <el-form-item label-width="3em">
                        <el-button type="primary" @click="Reset">重置</el-button>
                      </el-form-item>
                      <el-form-item label-width="3em">
                        <el-button type="danger" @click="search">搜索</el-button>
                      </el-form-item>
                    </el-col>
                  </el-row>
                </el-form>
              </div>
              <div>
                <el-table
                  class="demand"
                  :data="DetailedData"
                  border
                  default-expand-all
                  :height="240"
                  :header-cell-style="{ textAlign: 'center' }"
                  highlight-current-row
                >
                  <el-table-column size="mini" :index="indexMethod" type="index" show-overflow-tooltip label="序号" width="50"></el-table-column>
                  <el-table-column size="mini" prop="demandCode" show-overflow-tooltip label="需求编号"></el-table-column>
                  <el-table-column size="mini" prop="wabStatus" show-overflow-tooltip label="运单状态"></el-table-column>
                  <el-table-column size="mini" prop="dvrName" show-overflow-tooltip label="司机"></el-table-column>
                  <el-table-column size="mini" prop="trkNo" align="center" show-overflow-tooltip label="车牌"></el-table-column>
                  <el-table-column size="mini" prop="wabGoodName" show-overflow-tooltip label="货物名称"></el-table-column>
                  <el-table-column size="mini" prop="wabGoodType" align="center" show-overflow-tooltip label="品种"></el-table-column>
                  <el-table-column size="mini" prop="wabWeight" align="center" show-overflow-tooltip label="托运量"></el-table-column>
                  <el-table-column size="mini" prop="tel" align="center" show-overflow-tooltip label="联系电话"></el-table-column>
                  <el-table-column size="mini" prop="dvrName" align="left" show-overflow-tooltip label="联系人"></el-table-column>
                </el-table>
              </div>
              <!-- 分页 -->
              <el-pagination
                class="pagination"
                small
                background
                ref="pagination"
                @size-change="handleSizeChange"
                @current-change="handleCurrentChange"
                :current-page="Pagination.currentPage"
                :page-sizes="Pagination.pageSizeList"
                :page-size="Pagination.pageSize"
                :layout="Pagination.layout"
                :total="Pagination.total"
              ></el-pagination>
            </div>
            <div class="leftType" ref="leftType">
              <div class="line"></div>
              <h1>费用明细信息</h1>
              <div class="btn-area">
                <el-form ref="formDataRight" :model="formDataRight" label-width="auto" :inline="true" size="mini">
                  <el-row>
                    <el-col span="4.5">
                      <el-form-item prop="start" label>
                        <el-date-picker v-model="formDataRight.start" placeholder="选择开始时间" value-format="yyyy-MM-dd"></el-date-picker>
                      </el-form-item>
                    </el-col>
                    <el-col span="4.5">
                      <el-form-item prop="end" label-width="3em" label="——">
                        <el-date-picker v-model="formDataRight.end" placeholder="选择结束时间" value-format="yyyy-MM-dd"></el-date-picker>
                      </el-form-item>
                    </el-col>
                    <el-col span="4.5" class="elButton">
                      <el-form-item label-width="3em">
                        <el-button type="info" @click="financialService">金融服务</el-button>
                      </el-form-item>
                      <el-form-item label-width="3em">
                        <el-button type="primary" @click="ResetA">重置</el-button>
                      </el-form-item>
                      <el-form-item label-width="3em">
                        <el-button type="danger" @click="typeList">搜索</el-button>
                      </el-form-item>
                    </el-col>
                  </el-row>
                </el-form>
              </div>
              <el-table
                :data="rightData"
                class="charge"
                border
                default-expand-all
                :height="240"
                :header-cell-style="{ textAlign: 'center' }"
                highlight-current-row
                @row-click="feeTableRowClick"
              >
                <el-table-column size="mini" type="index" :index="indexStartNum" show-overflow-tooltip label="序号" width="50"></el-table-column>
                <el-table-column size="mini" prop="cbBillStatus" show-overflow-tooltip label="结算状态"></el-table-column>
                <el-table-column size="mini" prop="cbJpayer" show-overflow-tooltip label="结算对象"></el-table-column>
                <el-table-column size="mini" prop="cbBillType" show-overflow-tooltip label="费目名称"></el-table-column>
                <el-table-column size="mini" prop="cbWeight" align="center" show-overflow-tooltip label="结算吨位"></el-table-column>
                <el-table-column size="mini" prop="cbPrice" align="center" show-overflow-tooltip label="结算单价"></el-table-column>
                <el-table-column size="mini" prop="cbCreateTime" align="center" show-overflow-tooltip label="结算时间"></el-table-column>
                <el-table-column size="mini" prop="cbFinancialService" align="center" show-overflow-tooltip label="金融服务">
                  <template slot-scope="scope">
                    <span v-if="scope.row.cbFinancialService === 'Y'">是</span>
                    <span v-if="scope.row.cbFinancialService === 'N' || !scope.row.cbFinancialService">否</span>
                  </template>
                </el-table-column>
              </el-table>
              <el-pagination
                class="pagination"
                small
                background
                @size-change="handleSizeChangeA"
                @current-change="handleCurrentChangeA"
                :current-page="currentPage"
                :page-size="pageSize"
                layout="sizes, prev, pager, next, jumper,total"
                :total="parinTotal"
              ></el-pagination>
            </div>
          </div>
        </div>
        <!-- 平台 -->
        <div v-if="show1 == 5">
          <div class="tableFooter">
            <div class="leftType" ref="leftType">
              <div class="line"></div>
              <h1>需求信息</h1>
              <div class="btn-area">
                <el-form ref="formDataLeft" :model="formDataLeft" label-width="auto" :inline="true" size="mini">
                  <el-row>
                    <el-col span="4.5">
                      <el-form-item prop="start" label>
                        <el-date-picker v-model="formDataLeft.start" placeholder="选择开始时间" value-format="yyyy-MM-dd"></el-date-picker>
                      </el-form-item>
                    </el-col>
                    <el-col span="4.5">
                      <el-form-item prop="end" label-width="3em" label="——">
                        <el-date-picker v-model="formDataLeft.end" placeholder="选择结束时间" value-format="yyyy-MM-dd"></el-date-picker>
                      </el-form-item>
                    </el-col>
                    <el-col span="4.5" class="elButton">
                      <el-form-item label-width="3em">
                        <el-button type="primary" @click="Reset">重置</el-button>
                      </el-form-item>
                      <el-form-item label-width="3em">
                        <el-button type="danger" @click="search">搜索</el-button>
                      </el-form-item>
                    </el-col>
                  </el-row>
                </el-form>
              </div>
              <div>
                <el-table
                  :data="DetailedData"
                  border
                  class="demand"
                  default-expand-all
                  :height="240"
                  :header-cell-style="{ textAlign: 'center' }"
                  highlight-current-row
                >
                  <el-table-column size="mini" :index="indexMethod" type="index" show-overflow-tooltip label="序号" width="50"></el-table-column>
                  <el-table-column size="mini" prop="bidStatus" show-overflow-tooltip label="提交状态"></el-table-column>
                  <el-table-column size="mini" prop="demandCode" show-overflow-tooltip width="130" label="需求编号"></el-table-column>
                  <el-table-column size="mini" prop="brand" show-overflow-tooltip label="品牌"></el-table-column>
                  <el-table-column size="mini" prop="kind" show-overflow-tooltip label="品种"></el-table-column>
                  <el-table-column size="mini" prop="transportQuantity" show-overflow-tooltip label="运输重量"></el-table-column>
                  <el-table-column size="mini" prop="dailyOutput" show-overflow-tooltip label="规格"></el-table-column>
                  <el-table-column size="mini" prop="transportType" show-overflow-tooltip label="运输类型"></el-table-column>
                  <el-table-column size="mini" prop="transportMode" show-overflow-tooltip label="运输方式"></el-table-column>
                  <el-table-column size="mini" prop="requiredStartTime" show-overflow-tooltip label="要求开始时间" align="left" width="120"></el-table-column>
                </el-table>
              </div>
              <!-- 分页 -->
              <el-pagination
                class="pagination"
                small
                background
                ref="pagination"
                @size-change="handleSizeChange"
                @current-change="handleCurrentChange"
                :current-page="Pagination.currentPage"
                :page-sizes="Pagination.pageSizeList"
                :page-size="Pagination.pageSize"
                :layout="Pagination.layout"
                :total="Pagination.total"
              ></el-pagination>
            </div>

            <div class="leftType" ref="leftType">
              <div class="line"></div>
              <h1>费用明细信息</h1>
              <div class="btn-area">
                <el-form ref="formDataRight" :model="formDataRight" label-width="auto" :inline="true" size="mini">
                  <el-row>
                    <el-col span="4.5">
                      <el-form-item prop="start" label>
                        <el-date-picker v-model="formDataRight.start" placeholder="选择开始时间" value-format="yyyy-MM-dd"></el-date-picker>
                      </el-form-item>
                    </el-col>
                    <el-col span="4.5">
                      <el-form-item prop="end" label-width="3em" label="——">
                        <el-date-picker v-model="formDataRight.end" placeholder="选择结束时间" value-format="yyyy-MM-dd"></el-date-picker>
                      </el-form-item>
                    </el-col>
                    <el-col span="4.5" class="elButton">
                      <el-form-item label-width="3em">
                        <el-button type="primary" @click="ResetA">重置</el-button>
                      </el-form-item>
                      <el-form-item label-width="3em">
                        <el-button type="danger" @click="typeList">搜索</el-button>
                      </el-form-item>
                    </el-col>
                  </el-row>
                </el-form>
              </div>
              <el-table
                :data="rightData"
                class="charge"
                border
                default-expand-all
                :height="240"
                :header-cell-style="{ textAlign: 'center' }"
                highlight-current-row
              >
                <el-table-column size="mini" type="index" :index="indexStartNum" show-overflow-tooltip label="序号" width="50"></el-table-column>
                <el-table-column size="mini" prop="cbBillStatus" show-overflow-tooltip label="结算状态"></el-table-column>
                <el-table-column size="mini" prop="cbJpayer" show-overflow-tooltip label="结算对象"></el-table-column>
                <el-table-column size="mini" prop="cbBillType" show-overflow-tooltip label="费目名称"></el-table-column>
                <el-table-column size="mini" prop="cbWeight" align="center" show-overflow-tooltip label="结算吨位"></el-table-column>
                <el-table-column size="mini" prop="cbPrice" align="center" show-overflow-tooltip label="结算单价"></el-table-column>
                <el-table-column size="mini" prop="cbCreateTime" align="center" show-overflow-tooltip label="结算时间"></el-table-column>
              </el-table>
              <el-pagination
                class="pagination"
                small
                background
                @size-change="handleSizeChangeA"
                @current-change="handleCurrentChangeA"
                :current-page="currentPage"
                :page-size="pageSize"
                layout="sizes, prev, pager, next, jumper,total"
                :total="parinTotal"
              ></el-pagination>
            </div>
          </div>
        </div>
        <!-- 糖厂 -->
        <div v-if="show1 == 6">
          <div class="tableFooter">
            <div class="leftType" ref="leftType">
              <div class="line"></div>
              <h1>需求信息</h1>
              <div class="btn-area">
                <el-form ref="formDataLeft" :model="formDataLeft" label-width="auto" :inline="true" size="mini">
                  <el-row>
                    <el-col span="4.5">
                      <el-form-item prop="start" label>
                        <el-date-picker v-model="formDataLeft.start" placeholder="选择开始时间" value-format="yyyy-MM-dd"></el-date-picker>
                      </el-form-item>
                    </el-col>
                    <el-col span="4.5">
                      <el-form-item prop="end" label-width="3em" label="——">
                        <el-date-picker v-model="formDataLeft.end" placeholder="选择结束时间" value-format="yyyy-MM-dd"></el-date-picker>
                      </el-form-item>
                    </el-col>
                    <el-col span="4.5" class="elButton">
                      <el-form-item label-width="3em">
                        <el-button type="primary" @click="Reset">重置</el-button>
                      </el-form-item>
                      <el-form-item label-width="3em">
                        <el-button type="danger" @click="search">搜索</el-button>
                      </el-form-item>
                    </el-col>
                  </el-row>
                </el-form>
              </div>
              <div>
                <el-table
                  border
                  :data="DetailedData"
                  class="demand"
                  default-expand-all
                  :height="240"
                  :header-cell-style="{ textAlign: 'center' }"
                  highlight-current-row
                >
                  <el-table-column size="mini" :index="indexMethod" type="index" show-overflow-tooltip label="序号" width="50"></el-table-column>
                  <el-table-column size="mini" prop="bidStatus" show-overflow-tooltip label="提交状态"></el-table-column>
                  <el-table-column size="mini" prop="demandCode" show-overflow-tooltip width="130" label="需求编号"></el-table-column>
                  <el-table-column size="mini" prop="brand" show-overflow-tooltip label="品牌"></el-table-column>
                  <el-table-column size="mini" prop="kind" show-overflow-tooltip label="品种"></el-table-column>
                  <el-table-column size="mini" prop="transportQuantity" show-overflow-tooltip label="运输重量"></el-table-column>
                  <el-table-column size="mini" prop="dailyOutput" show-overflow-tooltip label="规格"></el-table-column>
                  <el-table-column size="mini" prop="transportType" show-overflow-tooltip label="运输类型"></el-table-column>
                  <el-table-column size="mini" prop="transportMode" show-overflow-tooltip label="运输方式"></el-table-column>
                  <el-table-column size="mini" prop="requiredStartTime" show-overflow-tooltip label="要求开始时间" align="left" width="120"></el-table-column>
                </el-table>
              </div>
              <!-- 分页 -->
              <el-pagination
                class="pagination"
                small
                background
                ref="pagination"
                @size-change="handleSizeChange"
                @current-change="handleCurrentChange"
                :current-page="Pagination.currentPage"
                :page-sizes="Pagination.pageSizeList"
                :page-size="Pagination.pageSize"
                :layout="Pagination.layout"
                :total="Pagination.total"
              ></el-pagination>
            </div>

            <div class="leftType" ref="leftType">
              <div class="line"></div>
              <h1>费用明细信息</h1>
              <div class="btn-area">
                <el-form ref="formDataRight" :model="formDataRight" label-width="auto" :inline="true" size="mini">
                  <el-row>
                    <el-col span="4.5">
                      <el-form-item prop="start" label>
                        <el-date-picker v-model="formDataRight.start" placeholder="选择开始时间" value-format="yyyy-MM-dd"></el-date-picker>
                      </el-form-item>
                    </el-col>
                    <el-col span="4.5">
                      <el-form-item prop="end" label-width="3em" label="——">
                        <el-date-picker v-model="formDataRight.end" placeholder="选择结束时间" value-format="yyyy-MM-dd"></el-date-picker>
                      </el-form-item>
                    </el-col>
                    <el-col span="4.5" class="elButton">
                      <el-form-item label-width="3em">
                        <el-button type="primary" @click="ResetA">重置</el-button>
                      </el-form-item>
                      <el-form-item label-width="3em">
                        <el-button type="danger" @click="typeList">搜索</el-button>
                      </el-form-item>
                    </el-col>
                  </el-row>
                </el-form>
              </div>
              <el-table
                :data="rightData"
                class="charge"
                border
                default-expand-all
                :height="240"
                :header-cell-style="{ textAlign: 'center' }"
                highlight-current-row
              >
                <el-table-column size="mini" type="index" :index="indexStartNum" show-overflow-tooltip label="序号" width="50"></el-table-column>
                <el-table-column size="mini" prop="cbBillStatus" show-overflow-tooltip label="结算状态"></el-table-column>
                <el-table-column size="mini" prop="cbJpayer" show-overflow-tooltip label="结算对象"></el-table-column>
                <el-table-column size="mini" prop="cbBillType" show-overflow-tooltip label="费目名称"></el-table-column>
                <el-table-column size="mini" prop="cbWeight" align="center" show-overflow-tooltip label="结算吨位"></el-table-column>
                <el-table-column size="mini" prop="cbPrice" align="center" show-overflow-tooltip label="结算单价"></el-table-column>
                <el-table-column size="mini" prop="cbCreateTime" align="center" show-overflow-tooltip label="结算时间"></el-table-column>
              </el-table>
              <el-pagination
                class="pagination"
                small
                background
                @size-change="handleSizeChangeA"
                @current-change="handleCurrentChangeA"
                :current-page="currentPage"
                :page-size="pageSize"
                layout="sizes, prev, pager, next, jumper,total"
                :total="parinTotal"
              ></el-pagination>
            </div>
          </div>
        </div>
      </div>
    </div>

    <finaccial-upload
      :show="uploadDialog.show"
      :title="uploadDialog.title"
      :file-list="fileList"
      :history-file-list="historyFileList"
      :show-template-button="true"
      @uploadClose="uploadClose"
      @doCommit="doCommit"
    ></finaccial-upload>
  </div>
</template>

<script>
import {
  updateService,
  queryService,
  selectToDoList,
  countTonsDay,
  queryWorkbenchChartForMoney,
  queryWorkbenchChart,
  queryWorkbenchChartG,
  queryWorkbenchChartForMoneyG,
  queryToDoBid,
  queryWorkbenchChartChargeBillList,
} from '@/request/api'
import paginationMixin from '@/mixins/pagination'
import { codeTableListb } from '@/request/api'
import store from '@/store'
// 引入修复element-table  的滚动区域的函数
import scrollChange from '@/utils/onscroll.js'
import finaccialUpload from '@/views/cstManagement/twoCstManagement/financialService/finaccial-upload'
import financialService from '@/request/cstManagement/financialService'
import { getLeftList } from '@/request/system/administrators'
export default {
  mixins: [paginationMixin],
  data() {
    return {
      uploadDialog: {
        show: false,
        title: '',
      },
      fileList: [],
      checked1: false,
      historyFileList: [],
      list: {
        mdlName: '',
        mdlUrl: '',
        mdlSeq: '',
        moduleChildrenGrand: [],
      },
      formData: {
        start: '',
        end: '',
      },
      DetailedData: [],
      ToDoCount: '',
      AllRequest: 0,
      AllMoney: 0,
      formDataLeft: {
        start: '',
        end: '',
      },
      formDataRight: {
        start: '',
        end: '',
      },
      chartTitle: '',
      listData: [
        { label: '当天承接总量', count: '' },
        { label: '当月承接总量', count: '' },
        { label: '年度承接总量', count: '' },
      ],
      itemList: [],
      userData: {
        msg: 'OK',
        success: 1,
        data: {
          names: [],
          transport: [],
          highway: [],
        },
      },
      indexStartNum: 1,
      currentPage: 1, //废弃
      pageSize: 30, //废弃
      parinTotal: 0, //废弃
      queryMsg: '',
      //下方表格数据
      TypeList: [],
      TonsList: {},
      //下方左边表格
      leftData: [],
      //下方右边表格
      rightData: [],
      feeTableCurrentRow: {},
    }
  },
  created() {},
  computed: {
    show1() {
      return localStorage.getItem('IS_SHOW1')
    },
  },
  components: {
    finaccialUpload,
  },
  mounted() {
    console.log(store.state.user.FLT_UUID_DX_H)
    this.titleShow()
    this.railwayCargo1A()
    this.countTonsDay()
    this.selectToDoList()
    this.refreshList()
    if (this.show1 == 4) {
      queryService({ companyId: store.state.user.FLT_UUID_DX_H }).then(res => {
        this.checked1 = res.data.fltFinancialServices == 'Y' ? true : false
      })
    }
    let demandWrapper = document.querySelector('.demand .el-table__body-wrapper')
    // 新增滚动条监听事件
    scrollChange(demandWrapper)

    let demandWrapper2 = document.querySelector('.charge .el-table__body-wrapper')
    // 新增滚动条监听事件
    scrollChange(demandWrapper2)

    this.typeList()
  },
  methods: {
    financialService() {
      if (Object.keys(this.feeTableCurrentRow).length === 0) {
        this.$message.error('至少选择一项')
        return
      }
      if (this.feeTableCurrentRow.cbFinancialService === 'Y') {
        this.$message.error('不能重复提交')
        return
      }
      this.uploadDialog.show = true
      this.uploadDialog.title = '提交附件'
    },
    getButton(menus) {
      if (menus && menus.length !== 0) {
        for (let item of menus) {
          if (item.mdlCode === 'financialService') {
            return item
          } else {
            const res = this.getButton(item.moduleChildren)
            if (res) {
              return res
            }
          }
        }
      }
    },
    doCommit() {
      const data = new FormData()
      const historyFileNames = this.historyFileList.map(item => item.aName)
      for (let file of this.fileList) {
        if (historyFileNames.includes(file.name)) {
          continue
        }
        data.append('files', file.raw)
      }
      data.append(
        'data',
        JSON.stringify([
          {
            fsDptId: this.$store.state.user.DPTID_DX_H,
            fsFltId: this.$store.state.user.FLT_UUID_DX_H,
            fsCmtId: this.feeTableCurrentRow.cbBillCmtId,
            fsStatus: 'YTJ',
            fsCreator: this.$store.state.user.USR_CODE_DX_H,
            fsAmount: this.feeTableCurrentRow.cbBillTotal,
            fsIsDel: '0',
          },
        ])
      )
      financialService.commitFinancialRequest(data).then(() => {
        this.$message.success({
          showClose: true,
          message: '提交成功',
        })
        this.uploadClose()
        // 跳转到金融服务页面
        getLeftList().then(res => {
          this.$store.commit('user/SET_NAV_BUTTON', this.getButton(res.data) || {})
          this.$router.push('/layout/cstManagement/twoCstManagement/financialService')
        })
      })
    },
    uploadClose() {
      this.historyFileList = []
      this.fileList = []
      this.uploadDialog.show = false
      this.typeList()
    },
    isNeed() {
      console.log(this.checked1)
      updateService({ uuid: store.state.user.FLT_UUID_DX_H, status: this.checked1 == true ? 'Y' : 'N' }).then(res => {
        console.log(res)
      })
    },
    //  2  集团首页  3 货主首页  4 供应商首页  5 平台首页 6 糖厂首页
    titleShow() {
      if (this.show1 == 1) {
        this.$store.state.tagViews.cachedViews = []
        this.$store.state.tagViews.visitedTags = []
      }
    },

    //待办事项跳转
    daibanClick(index) {
      this.list = {}
      if (this.show1 == 2) {
        //集团首页
        switch (index) {
          case 0:
            this.list = {
              mdlName: '集团需求确认',
              mdlUrl: '/Summary/twoSummary/confirmation',
              mdlSeq: 999,
              mdlId: 17768,
              moduleChildrenGrand: [
                {
                  mdlCode: 'confirm',
                  mdlName: '需求确认',
                  mdlSeq: 1,
                },
                {
                  mdlCode: 'unconfirm',
                  mdlName: '需求驳回',
                  mdlSeq: 1,
                },
                {
                  mdlCode: 'unConfirm',
                  mdlName: '取消确认',
                  mdlSeq: 3,
                },
              ],
            }
            this.$store.commit('user/SET_NAV_BUTTON', this.list)
            this.$router.push('/layout/Summary/twoSummary/confirmation')
            break
        }
        // console.log(index)
      } else if (this.show1 == 3) {
        //货主首页
        switch (index) {
          case 0:
            this.list = {
              mdlName: '糖厂/货主需求发布',
              mdlUrl: '/SugarFactory/secondarySugarFactory/tertiarySugarFactory',
              mdlSeq: 1,
              mdlId: 278,
              moduleChildrenGrand: [
                {
                  mdlCode: 'add',
                  mdlName: '新增',
                  mdlSeq: 1,
                },
                {
                  mdlCode: 'edit',
                  mdlName: '编辑',
                  mdlSeq: 2,
                },
                {
                  mdlCode: 'del',
                  mdlName: '删除',
                  mdlSeq: 3,
                },
                {
                  mdlCode: 'commitp',
                  mdlName: '平台汇总',
                  mdlSeq: 6,
                },
                {
                  mdlCode: 'copy',
                  mdlName: '复制需求',
                  mdlSeq: 7,
                },
                {
                  mdlCode: 'commitpt',
                  mdlName: '提交平台',
                  mdlSeq: 8,
                },
              ],
            }
            this.$store.commit('user/SET_NAV_BUTTON', this.list)
            this.$router.push('/layout/SugarFactory/secondarySugarFactory/tertiarySugarFactory')
            break
          case 1:
            this.list = {
              mdlName: '平台与客户对账',
              mdlUrl: '/settlement/towSettlement/customerReconciliation',
              mdlSeq: 33,
              mdlId: 352,
              moduleChildrenGrand: [],
            }
            this.$store.commit('user/SET_NAV_BUTTON', this.list)
            this.$router.push('/layout/settlement/towSettlement/customerReconciliation')
            break
          case 2:
            this.list = {
              mdlName: '合同管理',
              mdlUrl: '/orderManage/dealManage/threedealManage',
              mdlSeq: 1,
              mdlId: 331,
              moduleChildrenGrand: [
                {
                  mdlCode: 'downloadContract',
                  mdlName: '下载合同',
                  mdlSeq: 4,
                },
                {
                  mdlCode: 'printContract',
                  mdlName: '打印合同',
                  mdlSeq: 5,
                },
                {
                  mdlCode: 'sign',
                  mdlName: '签订',
                  mdlSeq: 6,
                },
              ],
            }
            this.$store.commit('user/SET_NAV_BUTTON', this.list)
            this.$router.push('/layout/orderManage/dealManage/threedealManage')
            break
          case 3:
            this.list = {
              mdlName: '竞价结果评审管理',
              mdlUrl: '/bidManagement/BiddingConfirm/twoBiddingConfirm',
              mdlSeq: 1,
              mdlId: 318,
              moduleChildrenGrand: [
                {
                  mdlCode: 'review',
                  mdlName: '评审',
                  mdlSeq: 1,
                },
                {
                  mdlCode: 'reviewDel',
                  mdlName: '取消评审',
                  mdlSeq: 2,
                },
              ],
            }
            this.$store.commit('user/SET_NAV_BUTTON', this.list)
            this.$router.push('/layout/bidManagement/BiddingConfirm/twoBiddingConfirm')
            break
          case 4:
            this.list = {
              mdlName: '供应商配额管理',
              mdlUrl: '/bidManagement/BiddingDeposit/twoBiddingDeposit',
              mdlSeq: 1,
              mdlId: 321,
              moduleChildrenGrand: [
                {
                  mdlCode: 'quota',
                  mdlName: '配额',
                  mdlSeq: 1,
                },
                {
                  mdlCode: 'quotaDel',
                  mdlName: '取消配额',
                  mdlSeq: 2,
                },
              ],
            }
            this.$store.commit('user/SET_NAV_BUTTON', this.list)
            this.$router.push('/layout/bidManagement/BiddingDeposit/twoBiddingDeposit')
            break
        }
      } else if (this.show1 == 4) {
        //供应商首页
        switch (index) {
          case 0:
            this.list = {
              mdlName: '调度派车',
              mdlUrl: '/orderSupervise/twoOrderSupervise/Dispatching',
              mdlSeq: 1,
              mdlId: 377,
              moduleChildrenGrand: [],
            }
            this.$store.commit('user/SET_NAV_BUTTON', this.list)
            this.$router.push('/layout/orderSupervise/twoOrderSupervise/Dispatching')
            break
          case 1:
            this.list = {
              mdlName: '费用结算',
              mdlUrl: '/cstManagement/twoCstManagement/sctOrderWay',
              mdlSeq: 1,
              mdlId: 17793,
              moduleChildrenGrand: [
                {
                  mdlCode: 'genBill',
                  mdlName: '生成结算单',
                  mdlSeq: 1,
                },
              ],
            }
            this.$store.commit('user/SET_NAV_BUTTON', this.list)
            this.$router.push('/layout/cstManagement/twoCstManagement/sctOrderWay')
            break
          case 2:
            this.list = {
              mdlName: '合同管理',
              mdlUrl: '/contractManage/twoContractManage/threeContractManage',
              mdlSeq: 1,
              mdlId: 362,
              moduleChildrenGrand: [
                {
                  mdlCode: 'addContract',
                  mdlName: '新增合同',
                  mdlSeq: 1,
                },
                {
                  mdlCode: 'editContract',
                  mdlName: '编辑合同',
                  mdlSeq: 2,
                },
                {
                  mdlCode: 'delContract',
                  mdlName: '删除合同',
                  mdlSeq: 3,
                },
                {
                  mdlCode: 'downloadContract',
                  mdlName: '下载合同',
                  mdlSeq: 4,
                },
                {
                  mdlCode: 'printContract',
                  mdlName: '打印合同',
                  mdlSeq: 5,
                },
                {
                  mdlCode: 'sign',
                  mdlName: '签订',
                  mdlSeq: 6,
                },
              ],
            }
            this.$store.commit('user/SET_NAV_BUTTON', this.list)
            this.$router.push('/layout/contractManage/twoContractManage/threeContractManage')
            break
          case 3:
            this.list = {
              mdlName: '供应商竞价报名',
              mdlUrl: '/bidAdminister/twoBidAdminister/biddingForApplication',
              mdlSeq: 1,
              mdlId: 368,
              moduleChildrenGrand: [
                {
                  mdlCode: 'auditButton',
                  mdlName: '报名',
                  mdlSeq: 1,
                },
                {
                  mdlCode: 'delAuditButton',
                  mdlName: '取消报名',
                  mdlSeq: 2,
                },
              ],
            }
            this.$store.commit('user/SET_NAV_BUTTON', this.list)
            this.$router.push('/layout/bidAdminister/twoBidAdminister/biddingForApplication')
            break
          case 4:
            this.list = {
              mdlName: '供应商竞价项目管理',
              mdlUrl: '/bidAdminister/twoBidAdminister/quotedAdminister',
              mdlSeq: 1,
              mdlId: 369,
              moduleChildrenGrand: [
                {
                  mdlCode: 'biddingButton',
                  mdlName: '竞价',
                  mdlSeq: 1,
                },
                {
                  mdlCode: 'delbiddingButton',
                  mdlName: '取消竞价',
                  mdlSeq: 2,
                },
                {
                  mdlCode: 'biddingButtonB',
                  mdlName: '导出',
                  mdlSeq: 4,
                },
              ],
            }
            this.$store.commit('user/SET_NAV_BUTTON', this.list)
            this.$router.push('/layout/bidAdminister/twoBidAdminister/quotedAdminister')
            break
          case 5:
            this.list = {
              mdlName: '订单管理',
              mdlUrl: '/orderSupervise/twoOrderSupervise/threeOrderSupervise',
              mdlSeq: 1,
              mdlId: 376,
              moduleChildrenGrand: [
                {
                  mdlCode: 'audit',
                  mdlName: '订单审核',
                  mdlSeq: 4,
                },
                {
                  mdlCode: 'cancleAudit',
                  mdlName: '取消审核',
                  mdlSeq: 5,
                },
              ],
            }
            this.$store.commit('user/SET_NAV_BUTTON', this.list)
            this.$router.push('/layout/orderSupervise/twoOrderSupervise/threeOrderSupervise')
            break
        }
      } else if (this.show1 == 5) {
        // 5 平台首页
        switch (index) {
          case 0:
            this.list = {
              mdlName: '平台需求汇总',
              mdlUrl: '/Summary/twoSummary/platformDemandSummary',
              mdlSeq: 1,
              mdlId: 17762,
              moduleChildrenGrand: [
                {
                  mdlCode: 'gen',
                  mdlName: '汇总需求',
                  mdlSeq: 1,
                },
                {
                  mdlCode: 'edit',
                  mdlName: '编辑',
                  mdlSeq: 2,
                },
                {
                  mdlCode: 'del',
                  mdlName: '删除',
                  mdlSeq: 3,
                },
              ],
            }
            this.$store.commit('user/SET_NAV_BUTTON', this.list)
            this.$router.push('/layout/Summary/twoSummary/platformDemandSummary')
            break
          case 1:
            this.list = {
              mdlName: '平台与供应商对账',
              mdlUrl: '/settlement/towSettlement/supplierReconciliation',
              mdlSeq: 1,
              mdlId: 351,
              moduleChildrenGrand: [
                {
                  mdlCode: 'print',
                  mdlName: '导出对账单',
                  mdlSeq: 1,
                },
                {
                  mdlCode: 'platformConfirm',
                  mdlName: '发起收款',
                  mdlSeq: 1,
                },
                {
                  mdlCode: 'check',
                  mdlName: '审核',
                  mdlSeq: 2,
                },
                {
                  mdlCode: 'confirmPayment',
                  mdlName: '付款确认',
                  mdlSeq: 5,
                },
              ],
            }
            this.$store.commit('user/SET_NAV_BUTTON', this.list)
            this.$router.push('/layout/settlement/towSettlement/supplierReconciliation')
            break
          case 2:
            this.list = {
              mdlName: '合同管理',
              mdlUrl: '/orderManage/dealManage/threedealManage',
              mdlSeq: 1,
              mdlId: 331,
              moduleChildrenGrand: [
                {
                  mdlCode: 'addContract',
                  mdlName: '新增合同',
                  mdlSeq: 1,
                },
                {
                  mdlCode: 'editContract',
                  mdlName: '编辑合同',
                  mdlSeq: 2,
                },
                {
                  mdlCode: 'delContract',
                  mdlName: '删除合同',
                  mdlSeq: 3,
                },
                {
                  mdlCode: 'downloadContract',
                  mdlName: '下载合同',
                  mdlSeq: 4,
                },
                {
                  mdlCode: 'printContract',
                  mdlName: '打印合同',
                  mdlSeq: 5,
                },
                {
                  mdlCode: 'sign',
                  mdlName: '签订',
                  mdlSeq: 6,
                },
                {
                  mdlCode: 'back',
                  mdlName: '驳回',
                  mdlSeq: 7,
                },
              ],
            }
            this.$store.commit('user/SET_NAV_BUTTON', this.list)
            this.$router.push('/layout/orderManage/dealManage/threedealManage')
            break
          case 3:
            this.list = {
              mdlName: '竞价结果评审管理',
              mdlUrl: '/bidManagement/BiddingConfirm/twoBiddingConfirm',
              mdlSeq: 1,
              mdlId: 318,
              moduleChildrenGrand: [
                {
                  mdlCode: 'review',
                  mdlName: '评审',
                  mdlSeq: 1,
                },
                {
                  mdlCode: 'reviewDel',
                  mdlName: '取消评审',
                  mdlSeq: 2,
                },
                {
                  mdlCode: 'annouce',
                  mdlName: '中标公告发布',
                  mdlSeq: 3,
                },
              ],
            }
            this.$store.commit('user/SET_NAV_BUTTON', this.list)
            this.$router.push('/layout/bidManagement/BiddingConfirm/twoBiddingConfirm')
            break
          case 4:
            this.list = {
              mdlName: '供应商配额管理',
              mdlUrl: '/bidManagement/BiddingDeposit/twoBiddingDeposit',
              mdlSeq: 1,
              mdlId: 321,
              moduleChildrenGrand: [
                {
                  mdlCode: 'quota',
                  mdlName: '配额',
                  mdlSeq: 1,
                },
                {
                  mdlCode: 'quotaDel',
                  mdlName: '取消配额',
                  mdlSeq: 2,
                },
              ],
            }
            this.$store.commit('user/SET_NAV_BUTTON', this.list)
            this.$router.push('/layout/bidManagement/BiddingDeposit/twoBiddingDeposit')
            break
          case 5:
            this.list = {
              mdlName: '竞价类型管理',
              mdlUrl: '/bidding/TransferBidding/wholeBidding',
              mdlSeq: 1,
              mdlId: 309,
              moduleChildrenGrand: [
                {
                  mdlCode: 'releaseBidding',
                  mdlName: '发布竞价',
                  mdlSeq: 1,
                },
                {
                  mdlCode: 'delReleasee',
                  mdlName: '取消发布',
                  mdlSeq: 2,
                },
                {
                  mdlCode: 'annouce',
                  mdlName: '公告发布',
                  mdlSeq: 3,
                },
              ],
            }
            this.$store.commit('user/SET_NAV_BUTTON', this.list)
            this.$router.push('/layout/bidding/TransferBidding/wholeBidding')
            break
          case 6:
            this.list = {
              mdlName: '订单计划',
              mdlId: 399,
              mdlUrl: '/orderSupervise/orderGeneration/orderPlan',
              mdlSeq: 0,
              moduleChildrenGrand: [
                {
                  mdlCode: 'add',
                  mdlName: '新增订单计划',
                  mdlSeq: 1,
                },
                {
                  mdlCode: 'edit',
                  mdlName: '修改订单计划',
                  mdlSeq: 2,
                },
                {
                  mdlCode: 'cancle',
                  mdlName: '取消订单计划',
                  mdlSeq: 3,
                },
                {
                  mdlCode: 'audit',
                  mdlName: '订单计划发布',
                  mdlSeq: 4,
                },
                {
                  mdlCode: 'cancleAudit',
                  mdlName: '取消发布',
                  mdlSeq: 5,
                },
              ],
            }
            this.$store.commit('user/SET_NAV_BUTTON', this.list)
            this.$router.push('/layout/orderSupervise/orderGeneration/orderPlan')
            break
        }
      } else if (this.show1 == 6) {
        //6 糖厂首页
        switch (index) {
          case 0:
            this.list = {
              mdlName: '糖厂/货主需求发布',
              mdlUrl: '/SugarFactory/secondarySugarFactory/tertiarySugarFactory',
              mdlSeq: 1,
              mdlId: 278,
              moduleChildrenGrand: [
                {
                  mdlCode: 'add',
                  mdlName: '新增',
                  mdlSeq: 1,
                },
                {
                  mdlCode: 'edit',
                  mdlName: '编辑',
                  mdlSeq: 2,
                },
                {
                  mdlCode: 'del',
                  mdlName: '删除',
                  mdlSeq: 3,
                },
                {
                  mdlCode: 'commitj',
                  mdlName: '提交集团',
                  mdlSeq: 4,
                },
                {
                  mdlCode: 'cancel',
                  mdlName: '取消提交集团',
                  mdlSeq: 5,
                },
                {
                  mdlCode: 'commitp',
                  mdlName: '平台汇总',
                  mdlSeq: 6,
                },
                {
                  mdlCode: 'copy',
                  mdlName: '复制需求',
                  mdlSeq: 7,
                },
              ],
            }
            this.$store.commit('user/SET_NAV_BUTTON', this.list)
            this.$router.push('/layout/SugarFactory/secondarySugarFactory/tertiarySugarFactory')
            break
          case 1:
            this.list = {
              mdlName: '平台与客户对账',
              mdlUrl: '/settlement/towSettlement/customerReconciliation',
              mdlSeq: 33,
              mdlId: 352,
              moduleChildrenGrand: [
                {
                  mdlCode: 'print',
                  mdlName: '导出对账单',
                  mdlSeq: 1,
                },
                {
                  mdlCode: 'confirmPayment',
                  mdlName: '付款确认',
                  mdlSeq: 2,
                },
              ],
            }
            this.$store.commit('user/SET_NAV_BUTTON', this.list)
            this.$router.push('/layout/settlement/towSettlement/customerReconciliation')
            break
          case 2:
            this.list = {
              mdlName: '合同管理',
              mdlUrl: '/orderManage/dealManage/threedealManage',
              mdlSeq: 1,
              mdlId: 331,
              moduleChildrenGrand: [
                {
                  mdlCode: 'downloadContract',
                  mdlName: '下载合同',
                  mdlSeq: 4,
                },
                {
                  mdlCode: 'printContract',
                  mdlName: '打印合同',
                  mdlSeq: 5,
                },
                {
                  mdlCode: 'sign',
                  mdlName: '签订',
                  mdlSeq: 6,
                },
              ],
            }
            this.$store.commit('user/SET_NAV_BUTTON', this.list)
            this.$router.push('/layout/orderManage/dealManage/threedealManage')
            break
          case 3:
            this.list = {
              mdlName: '竞价结果评审管理',
              mdlUrl: '/bidManagement/BiddingConfirm/twoBiddingConfirm',
              mdlSeq: 1,
              mdlId: 318,
              moduleChildrenGrand: [
                {
                  mdlCode: 'review',
                  mdlName: '评审',
                  mdlSeq: 1,
                },
                {
                  mdlCode: 'reviewDel',
                  mdlName: '取消评审',
                  mdlSeq: 2,
                },
                {
                  mdlCode: 'annouce',
                  mdlName: '中标公告发布',
                  mdlSeq: 3,
                },
              ],
            }
            this.$store.commit('user/SET_NAV_BUTTON', this.list)
            this.$router.push('/layout/bidManagement/BiddingConfirm/twoBiddingConfirm')
            break
          case 4:
            this.list = {
              mdlName: '供应商配额管理',
              mdlUrl: '/bidManagement/BiddingDeposit/twoBiddingDeposit',
              mdlSeq: 1,
              mdlId: 321,
              moduleChildrenGrand: [
                {
                  mdlCode: 'quota',
                  mdlName: '配额',
                  mdlSeq: 1,
                },
                {
                  mdlCode: 'quotaDel',
                  mdlName: '取消配额',
                  mdlSeq: 2,
                },
              ],
            }
            this.$store.commit('user/SET_NAV_BUTTON', this.list)
            this.$router.push('/layout/bidManagement/BiddingDeposit/twoBiddingDeposit')
            break
        }
      }
    },
    // 生成表格序号的方法
    indexMethod(index) {
      return 1 + index + (Number(this.Pagination.currentPage) - 1) * Number(this.Pagination.pageSize)
    },
    feeTableRowClick(val) {
      console.log(val)
      this.feeTableCurrentRow = val
    },
    //查询费用明细表
    typeList() {
      queryWorkbenchChartChargeBillList({
        startTime: this.formDataRight.start,
        endTime: this.formDataRight.end,
        PageIndexs: this.currentPage.toString(),
        PageSizes: this.pageSize.toString(),
      }).then(res => {
        this.rightData = res.data
        this.parinTotal = res.total
      })
    },
    searchList() {
      this.typeList()
    },
    handleSizeChangeA(val) {
      this.pageSize = val
      this.indexStartNum = (this.currentPage - 1) * this.pageSize + 1
      this.typeList()
    },
    handleCurrentChangeA(val) {
      this.currentPage = val
      this.indexStartNum = (this.currentPage - 1) * this.pageSize + 1
      this.typeList()
    },

    //需求信息
    getList(currentPage, pageSize, updateTotal) {
      // console.log(currentPage.toString());
      queryToDoBid({
        createdStart: this.formDataLeft.start,
        createdEnd: this.formDataLeft.end,
        PageIndex: currentPage.toString(),
        PageSize: pageSize.toString(),
      }).then(res => {
        this.DetailedData = res.data
        updateTotal(Number(res.total))
        // console.log(res);
      })
    },
    // 重置 上方搜索框
    Reset() {
      this.formDataLeft.start = ''
      this.formDataLeft.end = ''
    },
    //下方搜索框
    ResetA() {
      this.formDataRight.start = ''
      this.formDataRight.end = ''
    },
    //需求信息查询
    search() {
      this.$refs.formDataLeft.validate(valid => {
        if (valid) {
          this.refreshList()
        }
      })
    },

    //待办事项
    selectToDoList() {
      selectToDoList({}).then(res => {
        let data = []

        res.data.forEach(ele => {
          let currentLable = ele.label.split(' ')
          data.push(currentLable)
        })

        this.itemList = data
        this.ToDoCount = res.data[0].count
      })
    },

    //每日吨量
    countTonsDay() {
      countTonsDay({}).then(res => {
        for (var i = 0; i < res.data.length - 2; i++) {
          if (JSON.stringify(res.data[i]) == 'null') {
            this.listData[i].count = 0
          } else {
            this.listData[i].count = res.data[i]
          }
        }
        if (JSON.stringify(res.data[3]) == 'null') {
          this.AllRequest = 0
        } else {
          this.AllRequest = res.data[3]
          // console.log(this.AllRequest)
        }
        if (JSON.stringify(res.data[4]) == 'null') {
          this.AllMoney = 0
        } else {
          this.AllMoney = res.data[4]
          // console.log(this.AllRequest)
        }
      })
    },
    queryData() {
      if (this.queryMsg === 'money') {
        this.queryMoney()
      }
      if (this.queryMsg === 'num') {
        this.railwayCargo1A()
      }
    },

    //请求折线图假数据
    queryMoney() {
      this.queryMsg = 'money'
      this.chartTitle = '单位：元/吨'
      //请求接口，把请求来的数据赋值给this.userData 返回的数据格式最好跟this.response1的假数据格式一致
      queryWorkbenchChartForMoney({ times: this.formData.start }).then(res => {
        // console.log(res, 1111);
        if (res.success === '1') {
          if (res.data.length == 1) {
            this.userData.data = []
            let boxC = ['']
            let boxD = [0]
            let boxF = [0]
            res.data.forEach(item => {
              boxC.push(item.time)
              boxD.push(item.highwayMoneyNUm)
              boxF.push(item.multimodalTransportMoneyNum)
              this.userData.data.names = boxC
              this.userData.data.transport = boxD
              this.userData.data.highway = boxF
            })
            setTimeout(() => {
              this.railwayCargo1()
            }, 400)
          }
          if (res.data.length !== 1) {
            this.userData.data = []
            let boxC = []
            let boxD = []
            let boxF = []
            res.data.forEach(item => {
              boxC.push(item.time)
              boxD.push(item.highwayMoneyNUm)
              boxF.push(item.multimodalTransportMoneyNum)
              this.userData.data.names = boxC
              this.userData.data.transport = boxD
              this.userData.data.highway = boxF
            })
            setTimeout(() => {
              this.railwayCargo1()
            }, 400)
          }
        }
      })
    },

    //请求折线图假数据
    railwayCargo1A() {
      this.queryMsg = 'num'
      this.chartTitle = '单位：吨'
      //请求接口，把请求来的数据赋值给this.userData 返回的数据格式最好跟this.response1的假数据格式一致
      queryWorkbenchChart({ times: this.formData.start }).then(res => {
        if (res.success === '1') {
          if (res.data.length === 1) {
            let box = ['']
            let boxA = [0]
            let boxB = [0]
            res.data.forEach(item => {
              box.push(item.time)
              boxA.push(item.highwayDemandNum)
              boxB.push(item.multimodalTransportDemandNum)
              this.userData.data.names = box
              this.userData.data.transport = boxA
              this.userData.data.highway = boxB
            })
            setTimeout(() => {
              this.railwayCargo1()
            }, 400)
          }
          if (res.data.length !== 1) {
            let box = []
            let boxA = []
            let boxB = []
            res.data.forEach(item => {
              box.push(item.time)
              boxA.push(item.highwayDemandNum)
              boxB.push(item.multimodalTransportDemandNum)
              this.userData.data.names = box
              this.userData.data.transport = boxA
              this.userData.data.highway = boxB
            })
            setTimeout(() => {
              this.railwayCargo1()
            }, 400)
          }
        }
      })
    },
    //中间折线图
    railwayCargo1() {
      let _this = this
      let myChart = this.$echarts.init(document.getElementById('LineChartLeftB'))
      myChart._dom.children[0].style.margin = '0 auto'
      let data = [
        {
          name: '榨季转运',
          type: 'line',
          smooth: false, //曲线图为true,折线图为false
          data: this.userData.data.transport,
        },
        {
          name: '销售物流',
          type: 'line',
          smooth: false,
          data: this.userData.data.highway,
        },
      ]
      var date = this.userData.data.names
      myChart.clear()
      myChart.setOption({
        title: {
          text: this.chartTitle,
        },
        tooltip: {
          trigger: 'axis',
          position: function (pt) {
            return [pt[0], '10%']
          },
        },
        color: ['#d14a61', '#000'],
        legend: {
          // 图例
          orient: 'horizontal', // 布局方式，默认为水平布局 '水平' ¦ '垂直'  'horizontal' ¦ 'vertical'
          x: 'center', // 水平位置 'left' ¦ 'right' ¦ 'center' ¦ '数值' ¦ '百分数'
          y: '10', // 垂直位置 'top' ¦ 'bottom' ¦ 'center' ¦ '数值' ¦ '百分数'
          data: ['榨季转运', '销售物流'],
          textStyle: {
            color: '#000',
            fontSize: 14,
          },
        },
        xAxis: {
          type: 'category',
          boundaryGap: false,
          nameTextStyle: {
            color: '#CCCCCC',
            fontSize: 16,
          },
          axisLine: {
            // 坐标轴线
            show: true, // 默认显示，属性show控制显示与否
            lineStyle: {
              // 属性lineStyle控制线条样式
              color: '#CCCCCC',
            },
          },
          axisLabel: {
            show: true,
            textStyle: {
              color: '#CCCCCC',
              fontSize: 16, //更改坐标轴文字大小
            },
          },
          data: date,
        },

        yAxis: {
          type: 'value',
          // name:'订单/运单走势图',
          nameTextStyle: {
            color: '#000',
            fontSize: 16,
          },
          axisLine: {
            // 坐标轴线
            show: true, // 默认显示，属性show控制显示与否
            lineStyle: {
              // 属性lineStyle控制线条样式
              color: '#CCCCCC',
            },
          },
          axisLabel: {
            show: true,
            textStyle: {
              color: '#CCCCCC',
              fontSize: 16, //更改坐标轴文字大小
            },
          },
          boundaryGap: [0, '40%'],
        },
        grid: {
          top: '12%', // 等价于 y: '16%'
          left: '2%',
          right: '4%',
          bottom: '6%',
          containLabel: true,
        },
        series: data,
      })
    },
  },
}
</script>

<style lang="scss" scoped>
::v-deep .el-table th.gutter {
  width: 20px !important;
  display: table-cell !important;
}

::v-deep .el-table colgroup.gutter {
  display: table-cell !important;
}
::v-deep .el-table .warning-row {
  background: oldlace !important;
}

::v-deep .el-table .success-row {
  background: #f0f9eb !important;
}
.colorRed {
  color: red;
  cursor: pointer;
  width: 50px;
}
.colorHei {
  color: #000;
  cursor: pointer;
  width: 50px;
}
.openOrder {
  padding: 20px;
  .header {
    width: 100%;
    .leftData {
      width: 100%;
      height: auto;
      display: flex;
      justify-content: space-between;
      flex-wrap: wrap;
      text-decoration: none;
      .upper {
        width: 33%;
        height: 150px;
        text-align: center;
        padding-top: 50px;
        background-color: #fff;
        margin-top: 5px;
        border-color: rgba(0, 0, 0, 0.05);
        box-shadow: 4px 4px 40px rgba(0, 0, 0, 0.05);
        h1 {
          font-size: 17px;
          font-weight: 400;
          color: #666666;
        }
        .boxTest {
          width: 100%;
          .boxA {
            font-size: 35px;
            color: #df2315;
            margin-right: 5px;
            font-weight: 600;
          }
        }
      }
    }
    .contnet {
      display: flex;
      .LineChart {
        // width: calc(80% - 5px);
        width: 100%;
        text-align: center;
        margin-top: 20px;
        background: #ffff;
        // box-shadow: 10px 10px 10px #d9d9d9;
        .hderTop {
          display: flex;
          justify-content: space-between;
          padding: 0 20px 0 20px;
          margin-top: 20px;
          border-bottom: 1px solid #f4f5f9;
          .btn {
            width: 150px;
          }
        }
        .Chart {
          width: 100%;
          height: 300px;
          margin-top: 20px;
          .LineChartLeft {
            width: 100%;
            height: 100%;
          }
        }
      }
    }
    .h-ul {
      width: 100%;
      height: 400px;
      margin-top: 20px;
      display: flex;
      justify-content: space-between;
      .h-uiLeft {
        width: 48%;
        height: 400px;
        background-color: #fff;
        font-size: 16px;
        position: relative;
        .hUib {
          display: flex;
          justify-content: space-between;
          flex-wrap: wrap;
          text-decoration: none;
          .spanA {
            width: 100px;
          }
          .spanB {
            width: 50px;
          }
        }
        .line {
          width: 8px;
          height: 35px;
          background: red;
          position: absolute;
          top: 9px;
          left: 33px;
        }
        .title {
          font-weight: 600;
          font-size: 18px;
          padding-left: 20px;
        }
        li {
          width: 100%;
          height: 50px;
          padding: 0 30px 0 30px;
          line-height: 50px;
          border-bottom: 1px solid #f4f5f9;
        }
      }
      .h-uiRight {
        width: 51%;
        height: 400px;
        text-align: center;
        .upperA {
          margin-top: 10px;
        }
        .upper {
          width: 100%;
          height: 195px;
          background: #fff;
          display: flex;
          align-items: center;
          justify-content: center;
          flex-direction: column;
          h1 {
            font-size: 17px;
            font-weight: 400;
            color: #666666;
          }
          .boxTest {
            font-size: 30px;
            color: blue;
            font-weight: 600;
          }
        }
      }
    }

    .tableFooter {
      width: 100%;
      .leftType {
        width: 100%;
        background: #fff;
        margin-top: 20px;
        position: relative;
        .line {
          width: 8px;
          height: 35px;
          background: red;
          position: absolute;
          top: 9px;
          left: 33px;
        }
        h1 {
          height: 50px;
          line-height: 50px;
          font-weight: 600;
          font-size: 18px;
          padding-left: 50px;
          border-bottom: 1px solid #f4f5f9;
        }
        .btn-area {
          padding-bottom: 0;
          padding-top: 20px;
          .elButton {
            position: absolute;
            right: 0px;
          }
        }
      }
    }
  }
}
</style>
